package com.hy.controller;

import com.hy.service.CacheService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/7/20
 * Time: 10:51
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/cache")
public class CacheController {

    private final CacheService cacheService;

    @RequestMapping("/add")
    public int add(@RequestParam("a") int a, @RequestParam("b") int b){
        return cacheService.add(a, b);
    }
}
